public class Solution {
    public int getSum(int a, int b) {
        while(b != 0) {
            int x = a ^ b;
            int carry = (a & b) << 1;
            a = x;
            b = carry;
        }
        return a;
    }

    public static void main(String[] args) {
        int a = 2, b = 3;
        Solution solution = new Solution();
        int result = solution.getSum(a, b);
        System.out.println(result);
    }
}
